function area(shape: string, width: number, height: number) {
    var area = width * height;
    return "I'm a " + shape + " with an area of " + area + " cm squared.";
}

console.log(area("长方形", 5, 6));

interface Person {
    firstName: string;
    lastName: string;
}


function greeter(person: Person) {
    return "Hello," + person.firstName + " " + person.lastName;
}

var user = { firstName: 'fjq', lastName: 'fff' };

greeter(user);